<?php
/**
 * Created by PhpStorm.
 * User: fangwei
 * Date: 2019-09-12
 * Time: 21:47
 */

namespace App\Http\Requests\Admin;


use Illuminate\Foundation\Http\FormRequest;

class LiveInputDTO extends FormRequest
{
    public function authorize()
    {
        return true;
    }

    public function rules()
    {
        return [
            'name' => 'required|between:1,18',
            'password' => 'required|between:5,15',
        ];
    }

    public function messages()
    {
        return [
            'name.required' => '账号不能为空',
            'name.between' => '账号格式不合法',
            'password.required' => '请填写密码',
            'password.between' => '密码长度不符合规则',
        ];
    }
}